package ioTest;

import java.io.*;

/**
 * 对象流读取对象
 */
public class OISDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis = new FileInputStream("fos.txt");
        ObjectInputStream ois = new ObjectInputStream(fis);
        Object a = ois.readObject();//反序列化
        Student zs = (Student) a;
        System.out.println(zs);









    }
}
